package model;

import util.MyList;

public class Account {
    private String phone;
    private String password;
    private MyList shopCar;

    public Account(String phone, String password) {
        this.phone = phone;
        this.password = password;
    }

    /**
     * 判断输入的电话号码是不是同一个
     * @param account
     * @return
     */
    public boolean login(Account account){
        if (this.getPhone().equals(account.getPhone()) && this.getPassword().equals(account.getPassword())){
            return true;
        }
        return false;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }
    public void setPassword(String password){
        this.password = password;
    }

    public MyList getShopCar() {
        return shopCar;
    }

    public void setShopCar(MyList shopCar) {
        this.shopCar = shopCar;
    }
}
